<template>
  <div class="range-input">
    <el-input-number
      :disabled="disabled"
      class="number-input"
      v-model="value[0]"
      controls-position="right"
    />
    -
    <el-input-number
      :disabled="disabled"
      v-model="value[1]"
      class="number-input"
      controls-position="right"
    />
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  disabled: Boolean,
  value: {
    type: Array,
    default: () => [null, null]
  }
})

const { disabled, value } = toRefs(props)
</script>

<style lang="scss" scoped>
.number-input {
  width: 192px;

  :deep(.el-input__inner) {
    text-align: left;
    padding-left: 8px;
    padding-right: 20px;
  }

  :deep(span[role='button']) {
    width: 20px;
  }
}
</style>
